package 笔试.网易;

import javafx.scene.Camera;

import java.util.Scanner;

/**
 * @author:谢君臣
 * @Date:2021/8/21-16:21
 * @version:1.0
 * @function:
 */
import java.util.Scanner;
public class Main03 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] split = scanner.nextLine().split(" ");
        int length = split.length,count =0;
        int[] nums = new int[length];
        for (int i = 0; i < length; i++) {
            nums[i] = Integer.parseInt(split[i]);
        }
        if (length==1){
            System.out.println(1);
            return;
        }
        int[]dp = new int[length];
        for (int i = 0; i < length; i++) {
            if (i==0)
                dp[i]=1;
            else {
                if (nums[i]<=nums[i-1])dp[i]=dp[i-1];
                else dp[i] = dp[i-1]+1;
            }
        }
        for (int i : dp)
            count +=i;
        System.out.println(count);
    }
}
